import request from '@/utils/request'
// 获取员工列表
export function getEmployeeList(params) {
  return request.get('/sys/user', { params })
}
// 删除员工
export function deleteEmployee(id) {
  return request.delete(`/sys/user/${id}`)
}
// 新增员工
export function addEmployee(employees) {
  return request.post('/sys/user', employees)
}
// 批量导入员工
export function batchImport(list) {
  return request.post('/sys/user/batch', list)
}
// 修改用户信息
export function updataLoginInfro(id, user) {
  return request.put(`/sys/user/${id}`, user)
}
// 获取员工基本信息
export function getUserBasicInfro(id) {
  return request.get(`/employees/${id}/personalInfo`)
}
// 修改用户基本信息
export function updataPersonalInfo(from) {
  return request.put(`/employees/${from.userId}/personalInfo`, from)
}
// 获取岗位信息
export function getJobInfro(id) {
  return request.get(`/employees/${id}/jobs`)
}
// 保存员工岗位信息
export function updataJobInfro(form) {
  return request.put(`/employees/${form.userId}/jobs`, form)
}
// 给员工分配角色
export function allocateRole(role) {
  return request.put('/sys/user/assignRoles', role)
}

